---
const { class: className,title: title, secondTitle: secondTitle, link: link } = Astro.props;

---
<div class:list={["menu-box mt-[16px]", className]}>
   <div>
    <a href={link||'#'}>
    <span class="title">{title}
    {secondTitle&& <span class="text-[12px]">({secondTitle})</span>}
    </span>
  </a>
   </div>
  <slot />
</div>
<style lang="scss" scoped>
    .menu-box{
        border-radius: 8px;
        box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.3);
        width: 100%;
        display: inline-block;
        overflow: hidden;
    }
    .menu-box:hover{
        box-shadow: 0px 1px 4px 0px #712C2F;
        .title{
      background: #712C2F;
      color: #fff;
  }
 
    }
    .title{
        display: inline-block;
        background: #D8D5D5;
        width: 190px;
        height: 36px;
        line-height: 36px;
        color: #333;
        border-bottom-right-radius: 8px;
        padding-left: 16px;
        box-sizing: border-box;
        cursor: pointer;
        margin-bottom: 10px;
    }
  
    .unhover  .title:hover{
        background: #D8D5D5;
        color: #333;
  }
  .disabled{
    .title{
      background: #712C2F;
      color: #fff;
  }
  &:hover{
    box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.3);
  }

  }
</style>